import java.util.Scanner;
public class BC113 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int hour = in.nextInt();
        int minute = in.nextInt();
        int k = in.nextInt();
        int hour_a = hour + k / 60;
        int minute_a = k % 60;
        if (hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59) {
            if(hour_a<=10){
                System.out.print("0"+hour_a + ":" + minute_a);
            }
            else{
            	System.out.println( hour_a + ":" + minute_a);
            }
            
        }
    }
}